#coding=utf-8
from pytest import fixture
import requests,json


@fixture
def login():
    url='http://172.16.70.246/test/oa_auth/login'
    headers={'Content-Type':'application/json'}
    def _login(username='20280',password='000000'):
        data= {"password": password,
               "userNumber": username
               }
        res=requests.post(url,data=json.dumps(data),headers=headers)
        print(res.json())
        return  res
    return _login


@fixture
def method():
    class Method:
        post='POST'
        get = 'GET'
    return Method

